#-*- coding: utf-8 -*-

import wx

class ResizeGui(wx.Frame):
    ''' Resize GUI. '''
    def __init__(self, parent=None):
        super(ResizeGui, self).__init__(parent)
        
        # Set window title
        self.SetTitle('Resize')
        
        # Main sizer
        vbx_main = wx.BoxSizer(wx.VERTICAL)
        
        # Output directory boxer
        hbx_output = wx.BoxSizer(wx.HORIZONTAL)
        
        self.lbl_output = wx.StaticText(self, -1, 'Output directory')
        self.txt_output = wx.TextCtrl(self, -1)
        self.btn_browse_output = wx.Button(self, -1, 'Browse')
        hbx_output.Add(self.lbl_output, 0, wx.ALIGN_CENTER_VERTICAL, 5)
        hbx_output.Add(self.txt_output, 1, wx.EXPAND | wx.ALL, 5)
        hbx_output.Add(self.btn_browse_output, 0, wx.EXPAND | wx.ALL, 5)
        
        # Image list boxer
        hbx_image_list = wx.BoxSizer(wx.HORIZONTAL)
        
        self.lst_images = wx.ListBox(self, -1)
        
        vbx_image_buttons = wx.BoxSizer(wx.VERTICAL)
        self.btn_add_image = wx.Button(self, -1, 'Add')
        self.btn_remove_image = wx.Button(self,-1, 'Remove')
        self.btn_clear_image = wx.Button(self, -1,'Clear')
        self.btn_resize = wx.Button(self, -1, 'Resize')
        vbx_image_buttons.Add(self.btn_add_image, 0,
                              wx.EXPAND | wx.TOP, 5)
        vbx_image_buttons.Add(self.btn_remove_image, 0,
                              wx.EXPAND | wx.TOP, 5)
        vbx_image_buttons.Add(self.btn_clear_image, 0,
                              wx.EXPAND | wx.TOP, 5)
        vbx_image_buttons.Add(self.btn_resize, 0,
                              wx.EXPAND | wx.TOP, 5)
        
        hbx_image_list.Add(self.lst_images, 1, wx.EXPAND | wx.ALL, 5)
        hbx_image_list.AddSizer(vbx_image_buttons, 0, wx.EXPAND | wx.ALL, 5)
        
        vbx_main.Add(hbx_output, 0,
                     wx.EXPAND | wx.ALL, 5)
        vbx_main.Add(hbx_image_list, 1,
                     wx.EXPAND | wx.ALL, 5)
        
        
        self.SetSizer(vbx_main)
        
        self.Show(True)

app = wx.App()
gui = ResizeGui()
app.MainLoop()
